<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Index extends MY_Controller {

    public function __construct()
    {
        parent::__construct();
         $this->load->library('curl');
         $this->load->driver('cache', array('adapter' => 'apc', 'backup' => 'file'));
    }

    /**
     * Default function
     */
    public function index($user_id = false)
    {
        if(isset($_GET['s'])){
            $sql = "select * from posts where post_title like '%".$_GET['s']."%'";
            
            $query = $this->db->query($sql);
            
            $this->assign('results',$query->result());
        }
    }
    
    
    
}